<%@page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib prefix="sec" uri="http://www.springframework.org/security/tags"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE HTML>
<html>

<head>
    <title>首页</title>
</head>

<body>
<h3>这是首页</h3>

<c:if test="${pageContext.request.userPrincipal.name != null}">
    <label>
        欢迎<sec:authentication property ="name"/> !
        <a href="/logout">退出</a>
    </label>
</c:if>
<c:if test="${pageContext.request.userPrincipal.name == null}">
    <label>
        <a href="/login">登录</a>
    </label>
</c:if>

<hr/>

<a href="/import/add">导入|添加</a>
<a href="/import/delete">导入|删除</a>

<a href="/shenbao/add">申报|添加</a>

<a href="/userView">查看权限</a>

</body>

</html>